import request from "@/api";

// 登录
export const login = <T = any>(data: { username: string; password: string }) => {
  return request<T>({
    url: "/user/login",
    method: "post",
    data,
  });
};

// 验证登录状态
export const loginVerify = () => {
  return request({
    url: "/user/auth/login",
    method: "get",
  });
};

// 退出登录
export const logout = () => {
  return request({
    url: "/user/logout",
    method: "post",
  });
};
